
#ifndef __DEFORMATION_SHAPE_FSGPU_L1_H_
#define __DEFORMATION_SHAPE_FSGPU_L1_H_

#include "glslkernel.h"
#include "./mlsdeformer/typedefs.h"
#include "./mlsdeformer/constraints.h"
#include "./mlsdeformer/shape3D.h"
#include "./mlsdeformer/weightsScheme.h"

#include "deformationShape_FSGPU.h"

namespace MLS {

/// This class implements the MLS deformation process
/// using the GPU capabilities of the fragment shader processor
/// 
class DeformationShape_FSGPU_L1 : public DeformationShape_FSGPU {
   
public:
   DeformationShape_FSGPU_L1();
   ~DeformationShape_FSGPU_L1();
   
   void setting(Shape3D *model, const MLS::Constraints *constraints);
   
   /// Executes the MLS-deformation induced by the deformed constraints positions
   ///@param constraints the deformed constraints 
   //~ void execute_deformation(const MLS::Constraints *constraints);
   
private:
   //~ void setFBO();
   
private:
   //~ Shape3D                  *model;                //< the model positions
   
   //~ GLSLKernel                kernel;               //< the mls as-rigid-as-possible kernel
   //~ GLuint                    texPpoints;           //< texture object for P points
   //~ GLuint                    texQpoints;           //< texture object for Q points
   //~ GLuint                    texModelPositions;    //< texture object for model positions
   
   //~ GLuint                    quadSize;     //< quad size: It is used to generate the fragments
   //~ GLuint                    texFBO[2];    //< FBO's texture objects 
   //~ GLuint                    fbo;          //< The framebuffer object

   GLuint           texWeightsTable;
};

} // end MLS namespace

#endif
